﻿using System;
using DotNetNuke.Entities.Modules;
using HyperCrunch.Druid.Mobile;

/*******************************************************************************
 IMPORTANT: Priot to release, make sure this class file has a "Build Action" of 
            "Content" in Visual Studio to ensure that the module does not have 
            a dependency on HyperCrunch.Druid or HyperCrunch.Druid.Mobile 
  
            Also remove all project references to HyperCrunch.Druid and 
            HyperCrunch.Druid.Mobile prior to release.
*******************************************************************************/

namespace HyperCrunch.Druid.Sample 
{
    /// <summary> 
    /// This Model is available in the View (App.cshtml). It should provide all the information
    /// that the View needs to display so there is no business logic in the View
    /// </summary>
    public class AppModel : AppModelBase, IMobileAppModel
    {
        public ProductCollection Products { get; set; }
        public string Title { get; set; }

        public string ProductId
        {
            get
            {
                if (AppContext.Context.Request.QueryString["id"] != null)
                    return AppContext.Context.Request.QueryString["id"];
                else
                    return String.Empty;
            }
        }
    }

}